home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14801 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1022 b 

  1. Path: grimmy.reshall.umich.edu!user
  2. From: bforney@umich.edu (Brian Forney)
  3. Newsgroups: comp.lang.c++
  4. Subject: Problem with copy constructor in derived class
  5. Date: Mon, 01 Apr 1996 22:28:19 -0500
  6. Organization: University of Michigan, College of Engineering
  7. Message-ID: <bforney-0104962228190001@grimmy.reshall.umich.edu>
  8. NNTP-Posting-Host: grimmy.reshall.umich.edu
  9.  
  10. Hello. I'm trying to create a copy constructor for a derived class. The
  11. base class does not have a copy constructor, so this could be a problem.
  12. (I'm really not sure.) Can anyone tell me if the base class needs a copy
  13. constructor?
  14.  
  15. I started to consider the lack of a copy constructor in the base class a
  16. problem when Metrowerks 8's C++ compiler displayed this warning:
  17.  
  18. Error   : cannot construct base class 'LArray'
  19. UUrl.cp line 27   }
  20.  
  21. Here's the function in which the error occurs:
  22.  
  23. LUrlArray::LUrlArray(const LUrlArray &inArray)
  24. {
  25.    CopyWholeArray(inArray);
  26. }
  27.  
  28. The error occurs at the close brace. I'm not sure why this is happening.
  29. Any suggestions?
  30.